package models

// 定义请求的参数结构体
const (
	OrderTime  = "time"
	OrderScore = "score"
)

// ParamSignUp  注册参数
type ParamSignUp struct {
	Username   string `json:"username" binding:"required"`
	Password   string `json:"password" binding:"required"`
	RePassword string `json:"re_password" binding:"required,eqfield=Password"`
	Email      string `json:"email" binding:"required"`
	Captcha    string `json:"captcha" binding:"required"`
}

// ParamActivate  发送激活码邮件参数
type ParamActivate struct {
	Username string `json:"username" binding:"required"`
	Email    string `json:"email" binding:"required"`
}

// ParamLogin  登录请求参数
type ParamLogin struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type ParamUpdateUserInfo struct {
	OldContent string `json:"old_content" binding:"required"`
	NewContent string `json:"new_content" binding:"required"`
	Order      string `json:"order" binding:"required,oneof=email username password"`
	Captcha    string `json:"captcha"`
	UserName   string `json:"user_name"`
	UserId     int64  `json:"user_id,string"`
}

type ParamGuardianInfo struct {
	GuardianName string `json:"guardian_name" binding:"required"`
	Phone        string `json:"phone" binding:"required"`
	Email        string `json:"email" binding:"required"`
}

type ParamEquipmentInfo struct {
	EquipmentName string `json:"equipment_name" binding:"required"`
	Type          int8   `json:"type,string" binding:"oneof=1 2"`
	Status        int8   `json:"status,string" binding:"oneof=0 1"`
}

type ParamEquipmentStatus struct {
	EquipmentID int64 `json:"equipment_id,string" binding:"required"`
	Direction   int8  `json:"direction,string" binding:"oneof=0 1"`
}
